import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;

import Jama.Matrix;


public class Utility {

	public static Date convertToDate(String str) throws ParseException{
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
				"MM/dd/yy HH:mm");
		Date date = simpleDateFormat.parse(str);
		
		return date;
}
	
	public static void debug(Object object){
		System.out.println(object);
	}
	
	public static void printArray(double[][] array, int start, int end){
		if(array == null || array.length == 0){
			return;
		}
		
		for(int i = start; i < end; i++){
			System.out.println(Arrays.toString(array[i]));
		}
		
	}
	
	public static String printArray(double[][] array){
		if(array == null || array.length == 0){
			return null;
		}
		String str = "";
		for(int i = 0; i < array.length; i++){
			for(int j = 0; j < array[0].length; j++){
				str += String.format("%.4f ", array[i][j]);
			}
			str += String.format("\n");
		}
		
		return str;
	}
	
	public static void printArraySingleLine(double[][] array){
		if(array == null || array.length == 0){
			return;
		}
		
		for(int i = 0; i < array.length; i++){
			System.out.println(Arrays.toString(array[i]));
		}
		
	}
	
	
	
	
	
	
	
	
}
